﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="1_Manual.aspx.cs" Inherits="WebApp.AreaChartSample._1_Manual" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

			<div class="post">
				<h2 class="title">Synchronous, with JQuery</h2>
				<div style="clear: both;">&nbsp;</div>
				<div class="entry">

                    <div class="areaChart" id="manualSynchAreaChart">
                        <div class='loadingProgress'><div>Loading Chart...</div><img src='../App_themes/Default/chart-loader.gif' alt='Loading Chart...'/></div>
                    </div>

				</div>
			</div>
         
        <script language="javascript" type="text/javascript">
    
            google.load('visualization', '1', { packages: ['corechart'] });

            $().ready(function ()
            {
                // Parameters :
                // datasource               Source for the Chart in JSON Format
                // chartOptions             Chart options (Google parameters format)
                // type                     Type of Chart to generate, should be consistent with the chartOptions and datasource
                // hashKey                  The hashKey of the chartOptions. Necessary while having an external datasource. The External
                //                          DataSource may provide also the chartOptions. If different (based on the hashKey), the options will be replaced with the new one
                // errorCssClass            The CssClass to use while displaying an error message
               $('#manualSynchAreaChart').elgeeChart({ datasource: jQuery.parseJSON('<%= _json %>'), 
                                                       chartOptions: <%=_chartOptions %>, 
                                                       type: 'areaChart', 
                                                       hashKey: '<%=_hashKey %>',
                                                       errorCssClass: 'errorMessage'});
            });
        </script>
</asp:Content>
